package StudyCode.summary.myfile;

import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingDirectoryStream {
	public static void main(String[] args) {
		Path directory = Paths.get("E:\\CODE\\JAVA\\ReviewCode\\src\\StudyCode\\Component");
		try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(directory)) {
			for (Path file : directoryStream) {
				System.out.println(file.getFileName());
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}
